package com.yz.book.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yz.book.entity.Cart;

import java.math.BigDecimal;
import java.util.Collection;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author ste
 * @since 2023-02-04 03:37:36
 */
public interface CartService extends IService<Cart> {

    void addCart(Integer userId, Integer productId);

    Collection<Object> getItemByUserId(Integer userId);

    void updateItemNum(Integer userId, Integer productId, Integer buyCount);

    BigDecimal calTotalPrice(Integer userId, Integer[] productIds);
}
